﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCBill.ascx.cs" Inherits="Control_Bill_UCBill_Add" %>

 
        <style type="text/css">
    table
    {
        border: 1px;
        width: 100%;
 
        
        margin-right: 0px;
        background-color: #E6F0EF;
    }
    .t-head
    {
        background-color: #CCDCEA;
        text-align: center;
        font-size: 26px;
        color: blue;
        font-weight: bold;
    }    
    .style1
    {
        width: 768px;  
        height:auto; 
    }
    .style2
    {
        height:auto;
        width: 25%;
    }
    .style3
    {
        width: 20%;
    }

    .style4
    {
        width: 20%;
    }
    .style5
    {
        width: 10%;
    }
    .style6
    {
        width: 20%;
    }
    .style7
    {
        width: 10%;
    }
    .style8
    {
        width: 15%;
    }
    .style9
    {
        height: auto;
    }
    .style10
    {
        width: 33%;  
        height:auto; 
    }
    
    .style11
    {
        height: 10px;
    }
</style>
<input type="button" id='btn' onclick="" value="click here" />
<div style="overflow:auto; height:784px; width:42%">
    <table class="style1" >
      <tr >        
              <td class="t-head" colspan="5" >
                  Sale
              </td>
      </tr>
      <tr class="style6">  
            <td>
            </td>
                        <td>
                            <asp:Label ID="Label6" runat="server" Text="Date:"></asp:Label>
            </td>
                        <td>
                            <asp:TextBox ID="txtDate" runat="server" ReadOnly="True" Width="145px"></asp:TextBox>
            </td>
                        <td colspan="2">
                            &nbsp;</td>
            
      </tr>
      <tr class="style6">  
            <td>
            </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text="Customer's Name:"></asp:Label>
            </td>
                        <td>
                            <asp:TextBox ID="txtCusName" runat="server" Width="145px"></asp:TextBox>
            </td>
                        <td>
            </td>
                        <td>
            </td>
            
      </tr>
      <tr class="style6">  
            <td>
            </td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text="Product Type's Name:"></asp:Label>
            </td>
                        <td>
                            <asp:DropDownList ID="ddlProTyp" runat="server" AutoPostBack="True" 
                                DataTextField="PROTYP_NAME" DataValueField="PROTYP_ID" OnLoad="ddlProTyp_Load" 
                                OnSelectedIndexChanged="ddlProTyp_SelectedIndexChanged" width="150px">
                            </asp:DropDownList>
            </td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
            
      </tr>
      <tr class="style6">  
            <td>
            </td>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text="Product's Name:"></asp:Label>
            </td>
                        <td>
                            <asp:DropDownList ID="ddlPro" runat="server" AutoPostBack="True" Width="150px">
                            </asp:DropDownList>
            </td>
                        <td>
            </td>
                        <td>
            </td>
            
      </tr>
      <tr class="style6">  
            <td>
            </td>
                        <td>
                            <asp:Label ID="Label5" runat="server" Text="Quantity:"></asp:Label>
            </td>
                        <td>
                            <asp:TextBox ID="txtQuantity" runat="server" Width="145px"></asp:TextBox>
            </td>
                        <td>
                            <asp:RangeValidator ID="RangeValidator1" runat="server" 
                                ControlToValidate="txtQuantity" ErrorMessage="Be Number(&gt;0)" 
                                MaximumValue="5000" MinimumValue="1" Type="Integer" 
                                ValidationGroup="clickAdd"></asp:RangeValidator>
            </td>
                        <td>
            </td>            
      </tr>
      <tr class="style11">
            <td colspan="5" align="center">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtQuantity" ErrorMessage="Must enter quantity" 
                    SetFocusOnError="True" ValidationGroup="clickAdd"></asp:RequiredFieldValidator>
            </td>
      </tr>
       <tr class="style6">  
            <td colspan="5" align="center">
                <asp:Button ID="btnAdd" runat="server" AccessKey="0" OnClick="btnAdd_Click" 
                    Text="Add Product" ValidationGroup="clickAdd" Width="91px" />
            </td>
            
      </tr>
</table>      

       <tr>
            <td colspan="5"  align="center">
                <asp:GridView ID="GridView1" runat="server"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="3"  ForeColor="Black" GridLines="Vertical" 
                    OnRowDeleting="GridView1_RowDeleting" onpageindexchanging="GridView1_PageIndexChanging" PageSize="5" 
                     AutoGenerateColumns="False">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>                    
                        <asp:CommandField ShowDeleteButton="True" />
                          <asp:BoundField HeaderText="ID" DataField="car_ID" /> 
                          <asp:BoundField HeaderText="Product's Name" DataField="Product_Name" />
                          <asp:BoundField HeaderText="Description" DataField="description" />
                          <asp:BoundField HeaderText="Price" DataField="price" />
                          <asp:BoundField HeaderText="Quantity" DataField="quantity" />
                          <asp:BoundField HeaderText="Amount" DataField="amount" />                         
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="center" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />                
                </asp:GridView>    
            </td>
        </tr> 
<br />
<br />
        <tr>
            <td colspan="5"  align="center">
                <asp:GridView ID="GridView2" runat="server"
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="3"  ForeColor="Black" GridLines="Vertical" 
                 Width="100%"  PageSize="5"   AutoGenerateColumns="False">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>  
                          <asp:BoundField HeaderText="Catagories's Name" DataField="SERCAT_NAME" />
                          <asp:BoundField HeaderText="Service" DataField="SER_NAME" />
                          <asp:BoundField HeaderText="Price" DataField="SER_price" />                        
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="center" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />                
                </asp:GridView>
            </td>
        </tr>

    <table  class="style1"> 
          <tr class="style9">
            <td>
            </td>
                        <td>
            </td>
                        <td align="left">
                            <asp:Button ID="btnCollect" runat="server" OnClick="btnCollect_Click" 
                                TabIndex="1" Text="Collect" Width="78px" />
              </td>
                        <td>
                            &nbsp;</td>
                        <td>
                            <asp:Label ID="lbltest" runat="server" Text="Label" Visible="False"></asp:Label>
            </td>
      </tr>
        <tr class="style2">
            <td >
                <asp:Label ID="lblSub" runat="server" Text="Subtotal:" Visible="False"></asp:Label>
            </td>
            <td >
                <asp:TextBox ID="txtSub" runat="server" ReadOnly="True" Width="100px" 
                    Visible="False"></asp:TextBox>
            </td>
            <td >
                &nbsp;</td>
            <td>
                <asp:Label ID="lblPayment" runat="server" Text="Payment' style" Visible="False"></asp:Label>
            </td>   
            </td>
            <td >         
                <asp:DropDownList ID="ddlPayment" runat="server" AutoPostBack="True" 
                    DataTextField="PTYP_NAME" DataValueField="PTYP_ID" 
                    OnSelectedIndexChanged="ddlPayment_SelectedIndexChanged" Visible="False" 
                    Width="100px">
                </asp:DropDownList>
        </tr>
        <tr class="style2">
           <td>
               <asp:Label ID="lbltax" runat="server" Text="Tax:" Visible="False"></asp:Label>
               &nbsp;&nbsp;
               <asp:RangeValidator ID="RangeValidator4" runat="server" 
                   ControlToValidate="txtTax" ErrorMessage="must be number" MaximumValue="100" 
                   MinimumValue="0" Type="Integer"></asp:RangeValidator>
            </td>
           <td >
               <asp:TextBox ID="txtTax" runat="server" AutoPostBack="True" 
                   OnTextChanged="txtTax_TextChanged" Visible="False" Width="100px"></asp:TextBox>
               <asp:Label ID="lbl" runat="server" Text="%" Visible="False"></asp:Label>
           </td>
           <td>
               <asp:RangeValidator ID="RangeValidator3" runat="server" 
                   ControlToValidate="txtCash" ErrorMessage="Must be Number !!!" 
                   MaximumValue="500000000" MinimumValue="0" Type="Double">
               </asp:RangeValidator>
            </td>
           <td >
               <asp:Label ID="lblCash" runat="server" Text="Cash :" Visible="False"></asp:Label>
           </td>
            <td >
                <asp:TextBox ID="txtCash" runat="server" AutoPostBack="True" 
                    OnTextChanged="txtCash_TextChanged" Visible="False" Width="100px"></asp:TextBox>
            </td>            
        </tr>
        <tr  class="style2">
            <td>
                <asp:Label ID="lblTotal" runat="server" Text="Total :" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtTotal" runat="server" ReadOnly="True" Visible="False" Width="100px"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                <asp:Label ID="lblChange" runat="server" Text="Change :" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtChange" runat="server" ReadOnly="True" Visible="False" 
                    Width="100px"></asp:TextBox>
            </td>
        </tr>
        <tr  class="style2">
            <td>
                &nbsp;</td>
            <td colspan="2">
                <asp:Label ID="lblCashCheck" runat="server"></asp:Label>
            </td>
            <td >
                <asp:Label ID="lblTips" runat="server" Text="Tips :" Visible="False"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtTips" runat="server" Visible="False" Width="100px"></asp:TextBox>
            </td>
        </tr>
        <tr  class="style2">
            <td>
            </td>
            <td>
                <asp:Button ID="btnPay" runat="server" OnClick="btnPay_Click" Text="Payment" 
                    Visible="False" />
            </td>
            <td>
                <asp:Button ID="btnFinish" runat="server" OnClick="btnFinish_Click" 
                    Text="Finish" Visible="False" Width="73px" />
            </td>
            <td colspan="2">
                <asp:RangeValidator ID="RangeValidator5" runat="server" 
                    ControlToValidate="txtTips" ErrorMessage="must be number" MaximumValue="100000" 
                    MinimumValue="0" Type="Integer"></asp:RangeValidator>
            </td>
        </tr>
     </table>
</div>



